﻿<UserControl x:Class="Framework.UI.TestHarness.Views.ToolTipsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:params="http://schemas.codeplex.com/elysium/params"
             xmlns:extra="http://schemas.extra.com/ui"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <StackPanel>
        <StackPanel.Resources>
            <ToolTip x:Key="ToolTip">
                <TextBlock Style="{StaticResource NormalTextStyle}">
                    This is a shared ToolTip between the label and the TextBox. Its is located in the resources.
                    <LineBreak/>
                    You can add new lines by adding a LineBreak in the TextBlock so you don't end up with one massive line.
                </TextBlock>
            </ToolTip>
        </StackPanel.Resources>
        <TextBlock Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"
                   Style="{StaticResource NormalTextStyle}" 
                   Text="Plaster the whole application with quality tooltips. Every input control and its associated label should have a tooltip. If two controls need the same ToolTip, store it in the resources as below."/>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Label Content="Label"
                   Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"
                   Target="{Binding ElementName=ToolTipTextBox}"
                   ToolTip="{StaticResource ToolTip}"/>
            <TextBox x:Name="ToolTipTextBox" 
                     Grid.Column="1"
                     Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"
                     ToolTip="{StaticResource ToolTip}"/>
        </Grid>
    </StackPanel>
</UserControl>
